let clone = _createWindowClone(mutterWindow, thumbnailSize);
this._thumbnailBins[i].set_height(binHeight);
- this._thumbnailBins[i].add_child(clone);
+ this._thumbnailBins[i].child = clone;
mutterWindow.connectObject('destroy',
source => this._removeThumbnail(source, clone), this);
});
this.icon.y_align = Clutter.ActorAlign.CENTER;
- this.toggleButton.add_child(this.icon);
+ this.toggleButton.child = this.icon;
this.toggleButton._delegate = this;
this.setChild(this.toggleButton);
});
const hbox = new St.BoxLayout({vertical: true});
- this.add_child(hbox);
+ this.child = hbox;
this._dayLabel = new St.Label({
style_class: 'day-label',
// Private methods //
_createActors() {
+ // Add a group to clip the contents of the magnified view.
+ const mainGroup = new Clutter.Actor({clip_to_allocation: true});
+
// The root actor for the zoom region
- this._magView = new St.Bin({style_class: 'magnifier-zoom-region'});
+ this._magView = new St.Bin({
+ style_class: 'magnifier-zoom-region',
+ child: mainGroup,
+ });
global.stage.add_child(this._magView);
// hide the magnified region from CLUTTER_PICK_ALL
Shell.util_set_hidden_from_pick(this._magView, true);
- // Add a group to clip the contents of the magnified view.
- let mainGroup = new Clutter.Actor({clip_to_allocation: true});
- this._magView.set_child(mainGroup);
-
// Add a background for when the magnified uiGroup is scrolled
// out of view (don't want to see desktop showing through).
this._background = new Background.SystemBackground();
St.ButtonMask.TWO |
St.ButtonMask.THREE,
reactive: this._reactive,
- });
- indicator.child = new St.Widget({
- style_class: 'page-indicator-icon',
- pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
+ child: new St.Widget({
+ style_class: 'page-indicator-icon',
+ pivot_point: new Graphene.Point({x: 0.5, y: 0.5}),
+ }),
});
indicator.connect('clicked', () => {
this.emit('page-activated', pageIndex);
});
this._container.add_child(this._content);
- this._resultDisplayBin.set_child(this._container);
+ this._resultDisplayBin.child = this._container;
}
_setMoreCount(count) {
this._grid.layout_manager.spacing = node.get_length('spacing');
});
- this._resultDisplayBin.set_child(new St.Bin({
+ this._resultDisplayBin.child = new St.Bin({
child: this._grid,
x_align: Clutter.ActorAlign.CENTER,
- }));
+ });
this._maxResults = provider.maxResults ?? -1;
}
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
});
- this._statusBin = new St.Bin({y_expand: true});
+ this._statusBin = new St.Bin({
+ y_expand: true,
+ child: this._statusText,
+ });
this.add_child(this._statusBin);
- this._statusBin.add_child(this._statusText);
this._highlightDefault = false;
this._defaultResult = null;
_addIcon(item) {
let box = new St.BoxLayout({vertical: true});
- let bin = new St.Bin({style_class: 'input-source-switcher-symbol'});
- let symbol = new St.Label({
- text: item.shortName,
- x_align: Clutter.ActorAlign.CENTER,
- y_align: Clutter.ActorAlign.CENTER,
+ const symbol = new St.Bin({
+ style_class: 'input-source-switcher-symbol',
+ child: new St.Label({
+ text: item.shortName,
+ x_align: Clutter.ActorAlign.CENTER,
+ y_align: Clutter.ActorAlign.CENTER,
+ }),
});
- bin.set_child(symbol);
- box.add_child(bin);
+ box.add_child(symbol);
let text = new St.Label({
text: item.displayName,